package com.giga.bean;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.giga.enums.SexEnum;
import lombok.Data;

@Data
public class User extends Model<User> {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String name;
    @TableField(select = false)     //查询时不返回该字段的值
    private String authorizationCode;
    @TableField(value = "email",fill = FieldFill.INSERT)        //指定数据表中字段名，插入数据时自动进行填充
    private String email;
    @TableField(exist = false)
    private String address;     //数据库表中字段不存在

    @Version            //乐观锁的版本字段
    private Integer version;
    @TableLogic         //逻辑删除
    private Integer deleted;

    private SexEnum sex;    //性别，枚举类型
}
